package space.xxhui.config

import org.mybatis.scala.config.Configuration
import space.xxhui.dao.WordFreqDao

/**
 * @author HitvzByHui
 *         date 2021-09-12
 */
object MyBatisConfig extends Serializable  {

  // Load datasource configuration
  val config = Configuration("mybatis.xml")

  // Create a configuration space, add the data access method
  config.addSpace("item") { space =>
    space += WordFreqDao.incrInsert
  }

  // Build the session manager
  val persistenceContext = config.createPersistenceContext

}
